import { defineStore } from 'pinia'
import { Names } from './store-naspace'
import { reactive } from 'vue'
import type { ImproveQualityEfficiency } from '@/api/data/index'

type IndexStoreData = {
  improveQualityEfficiency: ImproveQualityEfficiency
}
export const indexStore = defineStore(Names.INDEX, () => {
  const indexStoreData = reactive<IndexStoreData>({
    improveQualityEfficiency: {} as ImproveQualityEfficiency
  })

  const setImproveQualityEfficiency = (data: ImproveQualityEfficiency) => {
    indexStoreData.improveQualityEfficiency = data
  }

  return {
    setImproveQualityEfficiency,
    indexStoreData
  }
})
